package com.huangyi.adminservice.user.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 声明 mq 配置信息
 */
@Slf4j
@Configuration
public class RabbitConfig {
    /**
     * 交换机名称
     */
    public static final String EXCHANGE_NAME = "edit_user_exchange";

    /**
     * 广播交换机
     * @return
     */
    @Bean
    public FanoutExchange editUserExchange() {
        return new FanoutExchange(EXCHANGE_NAME,true,false);
    }
}
